package com.xiaojie;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication

public class OrderApp {
    public static void main(String[] args) {
        SpringApplication.run(OrderApp.class);
    }
    @Bean
    @LoadBalanced    //ribbon负载均衡
    public RestTemplate RestTemplate(){
        return new RestTemplate();
    }
}
